import layoutHeaderAside from '@/layout/header-aside'

const meta = { auth: true }

export default {
  path: '/trade',
  name: 'trade',
  meta,
  redirect: { name: 'trade-list' },
  component: layoutHeaderAside,
  children: (pre => [
    {
      path: 'payment',
      name: `${pre}payment`,
      component: () => import('@/pages/trade/payment/index'),
      meta: { ...meta, title: '支付列表' }
    },
    {
      path: 'refund',
      name: `${pre}refund`,
      component: () => import('@/pages/trade/refund/index'),
      meta: { ...meta, title: '退款列表' }
    },
    {
      path: 'entpay',
      name: `${pre}entpay`,
      component: () => import('@/pages/trade/entpay/index'),
      meta: { ...meta, title: '转账列表' }
    },
    {
      path: 'basic/pay-channel',
      name: `${pre}basic-pay-channel`,
      component: () => import('@/pages/trade/pay-channel/index'),
      meta: { ...meta, title: '渠道管理' }
    },
    {
      path: 'basic/biz-type',
      name: `${pre}basic-biz-type`,
      component: () => import('@/pages/trade/biz/index'),
      meta: { ...meta, title: '业务类型' }
    },
    {
      path: 'account',
      name: `${pre}account`,
      component: () => import('@/pages/trade/account/index'),
      meta: { ...meta, title: '交易账号' }
    },
    {
      path: 'bill-check',
      name: `${pre}bill-check`,
      component: () => import('@/pages/trade/bill-check/index'),
      meta: { ...meta, title: '对账管理' }
    },
    {
      path: 'settlement',
      name: `${pre}settlement`,
      component: () => import('@/pages/trade/settlement/index'),
      meta: { ...meta, title: '结算管理' }
    }
  ])('trade-')
}
